package com.zld.smarket.dao;

import com.zld.smarket.dto.StockList;
import com.zld.smarket.pojo.Stock;
import com.zld.smarket.pojo.Stockin;

import java.util.List;

public interface StockMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Stock record);

    Stock selectByPrimaryKey(Long id);

    List<Stock> selectAll();

    int updateByPrimaryKey(Stock record);

    List<StockList> selectAllAndPage(Integer page, Integer limit);

    List<StockList> search(String s, Integer page, Integer limit);

    List<Stock>  selectbyGoodsno(Long goodsNo,Long supplier,Long storehouse);

    Integer addStockNum(Long goodsNo,Long supplier,Long storehouse,Long stockinNum);

    int insertStockin(Stock record);

    Integer reduceStockNum(Long goodsNo, Long supplierId, Long storehouseNo, Long stockoutNum);

    Stock selectbystockno(Long stockNo);

    List<StockList> stateSearch(String s, Integer page, Integer limit);
}